package com.first.homeqian.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.first.common.pojo.TbArticle;
import com.first.common.vo.Result;
import com.first.homeqian.mapper.ArticleMapper;
import com.first.homeqian.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: first-project
 * @description:
 * @author: 闫锦超
 * @create: 2023-06-02 16:28
 **/
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    @Override
    public Result getAllQianArticle(String id) {
        QueryWrapper<TbArticle> wrapper = new QueryWrapper<>();
        wrapper.eq("is_deleted",0);
        wrapper.eq("nav_id",id);
        TbArticle tbArticle = articleMapper.selectOne(wrapper);
        return Result.success(tbArticle);
    }
}
